// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'

// 引入vue-resource
import VueResource from 'vue-resource'
Vue.use(VueResource)

import Vuex from 'vuex' 
Vue.use(Vuex)
var store=new Vuex.Store({
  state:{
     vuex_count:0
  },
  mutations:{
     addcount(c,d){
       c.vuex_count+=d
     }
  },
  getters:{
    getcount_vuex:function(stat){
      return stat.vuex_count
    }
  }
})

// 全局导入MintUi
// import MintUI from 'mint-ui'
// import 'mint-ui/lib/style.css'
// Vue.use(MintUI)

// 按需引入mui组件
import { Header ,Swipe, SwipeItem,Button,Lazyload} from 'mint-ui';
Vue.component('myHeader', Header);
Vue.component(Swipe.name, Swipe);
Vue.component(SwipeItem.name, SwipeItem);
Vue.component(Button.name, Button);
Vue.use(Lazyload);

// 缩略图插件
import VuePreview from 'vue2-preview'
Vue.use(VuePreview)

// 引入mui样式
import './mui/css/mui.min.css'
import './mui/css/icons-extra.css'

Vue.config.productionTip = false




/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
